package com.clgk.wechatmall.common.util;

import java.util.Map;
import java.util.Random;
import java.util.concurrent.ConcurrentHashMap;

public class CommonUtils {
	
	/**
	 * 短信验证码
	 */
	public static Map<String, VerifyCodeVO> VERSIFYCODE_MAP = new ConcurrentHashMap<String, VerifyCodeVO>();
	/**
	 * 验证码超时时间
	 */
	public static long VERIFYCODE_OUT_TIME = 5 * 60 * 1000;
	
	/**
	 * 获取随机数字
	 * @param length（长度）
	 * @return
	 */
	public static String getRand(int length){
		Random r = new Random();
		StringBuilder randStr = new StringBuilder();
		for(int i = 0; i < length ; i++){
			randStr.append(r.nextInt(10));
		}
		return randStr.toString();
	}
	
	
	
}
